<%@ page language="java" import="java.util.*,java.sql.*,com.dao.*,com.util.*,com.user.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>个人设置页面</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
   
    <style>
        #b{
            width: 1000px;
            margin:50px;
        }
        #d1{
            width: 100%;
            height: 500px;
            background-color: wheat;
            margin-left: 150px;
            border-radius: 5%;
            box-shadow:8px 5px 5px gray;
        }
        #d2{
            width: 200px;
            height: 500px;
            float: left;
            /* background-color:cadetblue;*/
            background: -webkit-linear-gradient(lightskyblue,cadetblue);
        }
        #d3{
            width:800px;
            height: 100px;
            float: left;
            /*background-color: lightskyblue;*/
            background: -webkit-linear-gradient(left,lightpink,lightskyblue);
        }
        td{  width: 10%;
        }
        table{
            height: 400px;
            /* background-color:lightyellow;*/
            background: -webkit-linear-gradient(#cbff5a,lightskyblue);
            text-align: center;
            font-family: sans-serif;
        }
        #d2 div{

            height:150px;
            width: 200px;
            margin-top: 100px;
            background-color:white;
        }
        #d3 input {
            background-color: lightskyblue;
            width: 130px;

         }

    </style>
</head>
<body id="b" >
<div id="d1" >
    <div id="d2">
  <div>
    <p>板块</p>
   </div>
    </div>
    <div id="d3">
        <div style="margin-top: 50px;margin-left: 100px">用户： <input type="text" name="sbm3" value=""></div>
        <div style="padding-left: 400px;">
            <input type="submit" name="sbm3" value="发帖" >
            <a href="zhuce.jsp"> <input type="submit" name="sbm4" value="重置密码" style="width: 100px;"></a>
            <a href="login.html"> <input type="submit" name="sbm5" value="注销"></a>

        </div>
    </div>
    <div style="margin-left: 200px; margin-bottom: 20px;">
        <table bordercolor="blue" border="1" bgcolor="#f0f8ff"   >
        <tr ><th>帖子内容</th><th>发帖人</th><th>最后修改时间</th></tr>
        <% 
        Connection conn = DateBaseUtil.getConnection();
		String sql="select b.name,a.info,a.date from fatie a,user b where b.id=a.fid";
		PreparedStatement ps=conn.prepareStatement(sql);
		ResultSet rs=ps.executeQuery(sql);
	    List<User> users=new ArrayList<User>();
		while(rs.next()){
			User s=new User();
			
			s.setInfo(rs.getString("info"));
			s.setName(rs.getString("name"));
			s.setDate(rs.getString("date"));
			ps.execute();
			
			users.add(s);
		}
		
		for (User user : users) {
			   String a=user.getInfo();
			   String b=user.getName();
			   String c=user.getDate();
			  
			
				%>
			
         
		     <tr>
		     <td><%=a%></td>
		     <td><%=b %></td>
		     <td><%=c %></td>
		     
		     </tr>
		     
		 <%}%>
			
            <tr ><td contenteditable="true"></td><td></td><td></td></tr>
            <tr><td contenteditable="true"></td><td></td><td></td></tr>
        </table>
    </div>

</div>


</body>
</html>
